from iot.models import Unit
from dvadmin.utils.serializers import CustomModelSerializer
from dvadmin.utils.viewset import CustomModelViewSet


class UnitModelSerializer(CustomModelSerializer):
    class Meta:
        model = Unit
        fields = '__all__'


class UnitModelViewSet(CustomModelViewSet):
    queryset = Unit.objects.all()
    serializer_class = UnitModelSerializer
